Skip to content

Conversation

@bobtista
Copy link

Win32 Debug build was failing for me until I added this fix

@xezon
Copy link

xezon commented Nov 25, 2025

Why was this suddenly required?

@xezon
Copy link

xezon commented Nov 25, 2025

Check your preprocessor macros. For me _WINDOWS is present

image

@OmniBlade
Copy link

If anything _WIN32 should be the only one used as its set by the compiler unconditionally? Having them all is suboptimal.

@xezon
Copy link

xezon commented Nov 26, 2025

Yes maybe make a pass and just use _WIN32 everywhere? Do you still have this compile error?

@johnneijzen
Copy link

https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170#microsoft-specific-predefined-macros

_WIN32 Defined as 1 when the compilation target is 32-bit ARM, 64-bit ARM, x86, x64, or ARM64EC. Otherwise, undefined.

looking at documentation i agree we should just use _WIN32 instead of _WINDOWS just make simple and standard

@bobtista
Copy link
Author

Updated it to use _WIN32 instead of _WINDOWS

Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 48 files using _WINDOWS in this project, but only 11 files edited here.

@bobtista bobtista force-pushed the bobtista/fix-windows-platform-detection branch from e13bdae to 4acbc0b Compare November 28, 2025 22:56
@bobtista
Copy link
Author

There are 48 files using _WINDOWS in this project, but only 11 files edited here.

Found and updated all 48 files

@xezon xezon added Refactor Edits the code with insignificant behavior changes, is never user facing Build Anything related to building, compiling labels Nov 29, 2025
@xezon xezon changed the title fix(build): detect Windows using _WIN32/WIN32 in addition to _WINDOWS refactor: Replace _WINDOWS with _WIN32 Nov 29, 2025
@xezon xezon changed the title refactor: Replace _WINDOWS with _WIN32 refactor: Replace preprocessor condition _WINDOWS with _WIN32 Nov 29, 2025
@xezon xezon merged commit 61f69fc into TheSuperHackers:main Nov 29, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build Anything related to building, compiling Refactor Edits the code with insignificant behavior changes, is never user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants